/** empty object */
export interface EmptyObject {
	/** 正常返回10000，其他表示错误 */
	code: number
	data: Data
	/** 接口信息 */
	message: string
	[property: string]: any
}

export interface Data {
	/** 用户名 */
	account: string
	/** 头像 */
	avatar: string
	/** 收藏数量 */
	collectionNumber: number
	/** 问诊中信息 */
	consultationInfo: ConsultationInfo[]
	/** 我的优惠券数量 */
	couponNumber: number
	/** 用户id */
	id: string
	/** 关注数量 */
	likeNumber: number
	/** 手机号 */
	mobile: string
	orderInfo: OrderInfo
	/** 我的总积分 */
	score: number
	[property: string]: any
}

/** 问诊中信息 */
export interface ConsultationInfo {
	/** 医生头像 */
	avatar: string
	/** 科室 */
	depName: string
	/** 医院等级 */
	gradeName: string
	/** 医院名称 */
	hospitalName: string
	/** 医生id */
	id: string
	/** 医生姓名 */
	name: string
	/** 订单id */
	orderId: string
	/** 职称 */
	positionalTitles: string
	[property: string]: any
}

export interface OrderInfo {
	/** 已完成 */
	finishedNumber: number
	/** 待付款 */
	paidNumber: number
	/** 待发货 */
	receivedNumber: number
	/** 待收货 */
	shippedNumber: number
	[property: string]: any
}
export class EmptyObjectModel implements EmptyObject {
  code: number = 0
  data: Data = new DataModel({} as Data)
  message: string = ''

  constructor(model: EmptyObject) {
    this.code = model.code
    this.data = model.data
    this.message = model.message
  }
}
export class DataModel implements Data {
  account: string = ''
  avatar: string = ''
  collectionNumber: number = 0
  consultationInfo: ConsultationInfo[] = []
  couponNumber: number = 0
  id: string = ''
  likeNumber: number = 0
  mobile: string = ''
  orderInfo: OrderInfo = new OrderInfoModel({} as OrderInfo)
  score: number = 0

  constructor(model: Data) {
    this.account = model.account
    this.avatar = model.avatar
    this.collectionNumber = model.collectionNumber
    this.consultationInfo = model.consultationInfo
    this.couponNumber = model.couponNumber
    this.id = model.id
    this.likeNumber = model.likeNumber
    this.mobile = model.mobile
    this.orderInfo = model.orderInfo
    this.score = model.score
  }
}
export class ConsultationInfoModel implements ConsultationInfo {
  avatar: string = ''
  depName: string = ''
  gradeName: string = ''
  hospitalName: string = ''
  id: string = ''
  name: string = ''
  orderId: string = ''
  positionalTitles: string = ''

  constructor(model: ConsultationInfo) {
    this.avatar = model.avatar
    this.depName = model.depName
    this.gradeName = model.gradeName
    this.hospitalName = model.hospitalName
    this.id = model.id
    this.name = model.name
    this.orderId = model.orderId
    this.positionalTitles = model.positionalTitles
  }
}
export class OrderInfoModel implements OrderInfo {
  finishedNumber: number = 0
  paidNumber: number = 0
  receivedNumber: number = 0
  shippedNumber: number = 0

  constructor(model: OrderInfo) {
    this.finishedNumber = model.finishedNumber
    this.paidNumber = model.paidNumber
    this.receivedNumber = model.receivedNumber
    this.shippedNumber = model.shippedNumber
  }
}
